﻿/// <summary>
/// Developer: CHOOI KAH WAI
/// Last Modified: 16/11/2009
/// </summary>


using System;
using System.Collections;
using ARSS.Components;

namespace ARSS.Components
{
    /// <summary>
    /// Base class for augmented reality plugin.
    /// </summary>
    public class ARCom
    {
        #region Delegates / Events

        /// <summary>
        /// AR Matrices Updates
        /// </summary>
        public virtual event Coordinator.ARUpdateHandler ARUpdateEvent;

        #endregion

        #region Variables

        /// <summary>
        /// Array for detected markers
        /// </summary>
        public ArrayList CalcResults { get; set; }

        #endregion

        #region Functions

        /// <summary>
        /// Initialization
        /// </summary>
        /// <param name="vidWidth">Video Width</param>
        /// <param name="vidHeight">Video Height</param>
        /// <param name="boardCfg">Board Configuration File Path</param>
        /// <param name="actionCfg">Action Configuration File Path</param>
        /// <param name="co">System Coordinator</param>
        /// <param name="cam">Camera Info</param>
        public virtual void Init(int vidWidth, int vidHeight, string boardCfg, string actionCfg, Coordinator co, CamVideoInfo cam) { }

        /// <summary>
        /// Execute AR calculations here
        /// </summary>
        /// <param name="buffer">Video buffer</param>
        public virtual void OnCameraUpdate(byte[] buffer) { }

        /// <summary>
        /// Destroy component
        /// </summary>
        public virtual void Destroy(Coordinator co) { }

        #endregion
    }
}
